package com.mdd.front.service.tripartite.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mdd.common.entity.tripartite.TripartiteAppConfig;
import com.mdd.common.mapper.tripartite.TripartiteAppConfigMapper;
import com.mdd.front.service.tripartite.UserTripartiteAppConfigService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
* @author DELL
* {@code @description} 针对表【tripartite_app_config】的数据库操作Service实现
* {@code @createDate} 2023-11-06 13:24:46
 */
@Service
public class UserTripartiteAppConfigServiceImpl extends ServiceImpl<TripartiteAppConfigMapper, TripartiteAppConfig>
    implements UserTripartiteAppConfigService {

    @Resource
    TripartiteAppConfigMapper tripartiteAppConfigMapper;

    @Override
    public TripartiteAppConfig getAliPayConfig(String appType) {
        LambdaQueryWrapper<TripartiteAppConfig> tripartiteAppConfigWrapper=new LambdaQueryWrapper<>();
        tripartiteAppConfigWrapper.eq(TripartiteAppConfig::getType,appType).last("limit 1");
        return tripartiteAppConfigMapper.selectOne(tripartiteAppConfigWrapper);
    }
}




